import React, {Component} from 'react';
import { Input } from 'antd'
import styles from './css/EditableCellRender.css'

export default class EditableInputCell extends Component {
	
	render() {
		let {onChange, value, editable, type='text'} = this.props
		return (
			<div>
	    		{
	    			editable ? 
	    			<Input 
	    				className={styles.input}
		    			value={value} 
		    			type={type} 
		    			onChange={onChange}
	    			/>
	    			: 
	    			value
	    		}
	    	</div>
		)
	}
	
}
